// 引入request
import request from '../utils/request'
// const headers: any = {
//     "REQ-TIME": "20230412200335",
//     "TRANSACTION-ID": "38119c75-fe6d-472d-b316-dc59db727a22",
//     "APP-ID": "8000418004",
//     "Cookie": "Hm_lvt_adedae9bc250561cc17e96dc1fb46079=1681113394; _java110_token_=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqYXZhMTEwIiwidXNlck5hbWUiOiJ3dXh3IiwianRpIjoiYTQ2YWQyOTgzY2YzNGY3MTk2ZDUyZjdkZjI4MTZkNmIifQ.xFh-e07vLEc06FBfHxj1s189e8gGpuzVHRf1QJ2x7g0; SESSION=ODc2ZDRkZTEtODNiZi00MWQ3LWI1YjMtYzE5Njc1YmY2ODNm; Hm_lpvt_adedae9bc250561cc17e96dc1fb46079=1681301008"
// }
// 定义顶部导航接口
export function getTopNav() {
    return request.get("/api/app/menu.listCatalog?page=1&row=10&isShow=Y", {
        headers: {
            "REQ-TIME": "20230412200335",
            "TRANSACTION-ID": "38119c75-fe6d-472d-b316-dc59db727a22",
            "APP-ID": "8000418004",
        }
    })
}
// 定义左侧导航接口
export function getLeftNav() {
    return request.get("/api/app/menu.listCatalogMenus?caId=102022022641270001&communityId=2023032658120002", {
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230412204016",
            "TRANSACTION-ID": "69748cbc-a2fa-4bb5-a992-816404fcba47"
        }
    })
}


// 首页---获取业主信息
export function getAttrValue(specCd: any) {
    return request.get(`/api/app/owner.queryOwners?ownerTypeCd=1001&ownerId=&name=&link=&idCard=&address=&floorId=&floorName=&unitId=&roomNum=&roomId=&roomName=&page=1&row=10&communityId=2023032658120002`, {
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230412204016",
            "TRANSACTION-ID": "c1769af2-2840-4665-87b4-2ba0ed54b567"
        }
    })
}


// 首页---获取业主详情信息
export function getInformation(specCd: any) {
    return request.get(`/api/app/owner.queryOwners?ownerId=${specCd.ownerId}&page=1&row=1&communityId=2023032658120002&ownerTypeCd=1001`, {
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}

// 首页---获取业主商铺信息
export function getShops(specCd: any) {
    return request.get(`/api/app/room.queryRoomsByOwner?communityId=2023032658120002&ownerId=${specCd.ownerId}`, {
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}
// 首页---获取业主车位信息
export function getParkingLot(specCd: any) {
    return request.get(`/api/app/parkingSpace.queryParkingSpacesByOwner?communityId=2023032658120002&ownerId=${specCd.ownerId}`, {
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}

// 首页---获取业主车辆信息
export function getCarList(specCd: any) {
    return request.get(`/api/app/owner.queryOwnerCars`, {
        params: specCd,
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}

// 首页---获取业主车辆费用
export function getCarFee(specCd: any) {
    return request.get(`/api/app/fee.listFee`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}

// 首页---获取业主车辆费用缴费接口
export function getCarPay(specCd: any) {
    return request.get(`/api/app/feeApi/listFeeObj`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230419214000",
            "TRANSACTION-ID": "91f2c1a5-f812-4ebb-80e3-ebc270ea26dc"
        }
    })
}

// 首页---获取业主车辆费用缴费接口--用户信息
export function getCarPayUser(specCd: any) {
    return request.get(`/api/app/account/queryOwnerAccount`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230422185701",
            "TRANSACTION-ID": "62862be4-6845-4b9a-8fbf-aa519bc2d2a3"
        }
    })
}


// 首页---获取业主车辆费--历史信息
export function getCarPayHistory(specCd: any) {
    return request.get(`/api/app/fee.listFee`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230422210734",
            "TRANSACTION-ID": "008d10c2-e79b-452a-8f1c-f39fc6663c1b"
        }
    })
}

// 首页---获取业主车辆费--历史信息--缴费记录
export function getCarPayHistoryRecord(specCd: any) {
    return request.get(`/api/app/fee.queryFeeDetail`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230422231737",
            "TRANSACTION-ID": "8838a836-abae-4b20-8913-be9d6dc1e5b2"
        }
    })
}

// 首页---获取业主车辆费--历史信息--缴费记录--缴费详情(户主信息)
export function getCarPayHistoryRecordDetail(specCd: any) {
    return request.get(`/api/app/fee.queryFeeDetail`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": " 20230422231737",
            "TRANSACTION-ID": "8838a836-abae-4b20-8913-be9d6dc1e5b2"
        }
    })
}

// 首页---获取业主车辆记录--续租
export function getCarPayHistoryRecordRenew(specCd: any) {
    return request.get(`/api/callComponent/owner.queryOwnerCars`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230423200355",
            "TRANSACTION-ID": "7ec883e7-6596-429f-bf5e-f7a20c8683ba"
        }
    })
}

// 首页---获取业主车辆记录--续租--提交  
export function getRenewalSubmission(specCd: any) {
    return request.post(`/api/callComponent/owner.carAddParkingSpace`,specCd, {
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230502205811",
            "TRANSACTION-ID": "8f58c896-5c67-406f-9024-b3be0c771e6d"
        }
    })
}


// 首页---登记户主----+物业费---选择车辆
export function getCarPayHistoryRecordRenewCar(specCd: any) {
    return request.get(`/api/app/parkingSpace.queryParkingSpaces`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230423200355",
            "TRANSACTION-ID": "7ec883e7-6596-429f-bf5e-f7a20c8683ba"
        }
    })
}

// 首页---登记户主----+物业费---选择业主
export function getCarPayHistoryRecordRenewOwner(specCd: any) {
    return request.get(`/api/app/owner.queryOwners`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230423200355",
            "TRANSACTION-ID": "7ec883e7-6596-429f-bf5e-f7a20c8683ba"
        }
    })
}

// 首页---登记户主----续租---选择车位
export function getCarPayHistoryRecordRenewParking(specCd: any) {
    return request.get(`/api/app/parkingSpace.queryParkingSpaces`, {
        // 请求参数
        params: specCd,
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230423200355",
            "TRANSACTION-ID": "7ec883e7-6596-429f-bf5e-f7a20c8683ba"
        }
    })
}

// 首页---登记户主----+物业费---提交 
export function getCarPayHistoryRecordRenewSubmit(specCd: any) {
    return request.post(`/api/callComponent/owner.saveOwnerCar`, specCd,{
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230501213149",
            "TRANSACTION-ID": "bac86087-0965-4fbc-81e4-70dafe4943ef"
        }
    })
}

// 首页---登记户主----释放
export function getRelease(specCd: any) {
    return request.post(`/api/callComponent/owner.deleteCarParkingSpace`, specCd,{
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230501213149",
            "TRANSACTION-ID": "bac86087-0965-4fbc-81e4-70dafe4943ef"
        }
    })
}

// 首页---登记户主----删除
export function getDelete(specCd: any) {
    return request.post(`/api/callComponent/owner.deleteOwnerCars`, specCd,{
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230501231225",
            "TRANSACTION-ID": "ee1b07dc-eb3b-4e9c-8791-d8189bfffb9c"
        }
    })
}

// 首页---登记户主----确定修改  
export function getUpdate(specCd: any) {
    return request.post(`/api/callComponent/owner.editOwnerCar`, specCd,{
        // 请求头
        headers: {
            "APP-ID": "8000418004",
            "REQ-TIME": "20230502202900",
            "TRANSACTION-ID": "d51ebe6b-ce3c-42fa-b87b-e3494c61e5e6"
        }
    })
}
